{% extends 'base.html' %}

{% block main_body %}
    <div style="min-height: 458px;">
        <section class="content-header">
          <h1>
            协议字段解析
          </h1>
        </section>

        <section class="content container-fluid">
          <div class="row">
            <div class="col-xs-12">
              <div class="box">
                <form class="form-horizontal" action="{% url 'protocol_resolution' %}" method="post">
                  {% csrf_token %}
                  <div class="box-body">
                    <div class="form-group">
                      <label class="col-sm-2">输入文件名：</label>
                      <br/>
                      <br/>
                      <div class="col-sm-4">
                        <input type="text" name="file_name">
                      </div>
                      <br/>
                      <br/>
                      <div class="col-sm-10">
                          <button type="submit" name="analysis" class="btn btn-primary">解析</button> &nbsp;
                          <button type="reset" class="btn btn-default">重置</button> &nbsp;
                          {% if flag %}
                          <input id="chart" type="button" class="btn btn-info" value="图像" />
                          {% endif %}
                          <div class="col-sm-offset-2 col-sm-10"></div>
                      </div>
                    </div>
                  </div>
                  {% if error_message %} <p><strong>{{ error_message }}</strong></p> {% endif %}
                </form>
              </div>
            </div>
          </div>
        </section>
    </div>
{% endblock %}